package work.boom1;

/**
 * @author lijunhao
 * 2023/7/12 作业
 * @description TODO
 */
public class King {
     private String name;
     private int reignYears;
     private String achievements;
    private String description;

    public King(){}
    public King(String name, int reignYears, String achievements, String description) {
        this.name = name;
        this.reignYears = reignYears;
        this.achievements = achievements;
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getReignYears() {
        return reignYears;
    }

    public void setReignYears(int reignYears) {
        this.reignYears = reignYears;
    }

    public String getAchievements() {
        return achievements;
    }

    public void setAchievements(String achievements) {
        this.achievements = achievements;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    public void show() {
        System.out.println("姓名: " + name);
        System.out.println("在位时间: " + reignYears + "年");
        System.out.println("政绩: " + achievements);
        System.out.println("描述: " + description);
    }
}

